//
//  TestController.m
//  Byelone
//
//  Created by Qi Liu on 2021/3/2.
//

#import "TestController.h"
#import "BLMeetGiftCell.h"

@interface TestController ()<UITableViewDelegate,UITableViewDataSource>

@end

@implementation TestController

- (void)viewDidLoad {
    [super viewDidLoad];
    UITableView * list = [[UITableView alloc]initWithFrame:BL_WINDOW_FRAME style:UITableViewStylePlain];
    list.delegate = self;
    list.dataSource = self;
    [list registerNib:[UINib nibWithNibName:@"BLMeetGiftCell" bundle:nil] forCellReuseIdentifier:@"BLMeetGiftCell"];
    [self.view addSubview:list];
}

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 5;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 160;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    BLMeetGiftCell * cell = [tableView dequeueReusableCellWithIdentifier:@"BLMeetGiftCell"];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle]loadNibNamed:@"BLMeetGiftCell" owner:nil options:nil] lastObject];
    }
//    cell
    return cell;
}

@end
